package com.n9.qq.android.login.tlv;

import com.n9.qq.util.Util;

/**
 * @author ice
 * @since 2019/2/11 11:15
 */
public class Tlv0001 extends BaseTlv {
    int j = 1;
    int k = 20;

    public Tlv0001() {
        this.cmd = 0x0001;
    }

    /**
     * @param qqUin         QQ号
     * @param var3          未知：new byte[4]
     * @param serverCurTime 服务器当前时间
     * @return
     */
    public byte[] getData(long qqUin, byte[] var3, long serverCurTime) {
        byte[] var5 = new byte[this.k];
        Util.int16_to_buf(var5, 0, this.j);
        Util.int32_to_buf(var5, 2, Util.get_rand_32());
        Util.int32_to_buf(var5, 6, (int)qqUin);
        Util.int64_to_buf32(var5, 10, serverCurTime);
        System.arraycopy(var3, 0, var5, 14, var3.length);
        int var4 = var3.length + 14;
        Util.int16_to_buf(var5, var4, 0);

        return this.getBufData(var5);
    }

}
